\(\int \frac {1}{x^2 (1+x^6)} \, dx\) [1371]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [C] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 85 \[ \int \frac {1}{x^2 \left (1+x^6\right )} \, dx=-\frac {1}{x}+\frac {1}{6} \arctan \left (\sqrt {3}-2 x\right )-\frac {\arctan (x)}{3}-\frac {1}{6} \arctan \left (\sqrt {3}+2 x\right )-\frac {\log \left (1-\sqrt {3} x+x^2\right )}{4 \sqrt {3}}+\frac {\log \left (1+\sqrt {3} x+x^2\right )}{4 \sqrt {3}} \]

[Out]

-1/x-1/3*arctan(x)-1/6*arctan(2*x-3^(1/2))-1/6*arctan(2*x+3^(1/2))-1/12*ln(1+x^2-x*3^(1/2))*3^(1/2)+1/12*ln(1+
x^2+x*3^(1/2))*3^(1/2)

Rubi [A] (verified)

Time = 0.19 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.636, Rules used = {331, 301, 648, 632, 210, 642, 209} \[ \int \frac {1}{x^2 \left (1+x^6\right )} \, dx=\frac {1}{6} \arctan \left (\sqrt {3}-2 x\right )-\frac {\arctan (x)}{3}-\frac {1}{6} \arctan \left (2 x+\sqrt {3}\right )-\frac {\log \left (x^2-\sqrt {3} x+1\right )}{4 \sqrt {3}}+\frac {\log \left (x^2+\sqrt {3} x+1\right )}{4 \sqrt {3}}-\frac {1}{x} \]

[In]

Int[1/(x^2*(1 + x^6)),x]

[Out]

-x^(-1) + ArcTan[Sqrt[3] - 2*x]/6 - ArcTan[x]/3 - ArcTan[Sqrt[3] + 2*x]/6 - Log[1 - Sqrt[3]*x + x^2]/(4*Sqrt[3
]) + Log[1 + Sqrt[3]*x + x^2]/(4*Sqrt[3])

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 301

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Module[{r = Numerator[Rt[a/b, n]], s = Denominator[Rt[a/
b, n]], k, u}, Simp[u = Int[(r*Cos[(2*k - 1)*m*(Pi/n)] - s*Cos[(2*k - 1)*(m + 1)*(Pi/n)]*x)/(r^2 - 2*r*s*Cos[(
2*k - 1)*(Pi/n)]*x + s^2*x^2), x] + Int[(r*Cos[(2*k - 1)*m*(Pi/n)] + s*Cos[(2*k - 1)*(m + 1)*(Pi/n)]*x)/(r^2 +
 2*r*s*Cos[(2*k - 1)*(Pi/n)]*x + s^2*x^2), x]; 2*(-1)^(m/2)*(r^(m + 2)/(a*n*s^m))*Int[1/(r^2 + s^2*x^2), x] +
Dist[2*(r^(m + 1)/(a*n*s^m)), Sum[u, {k, 1, (n - 2)/4}], x], x]] /; FreeQ[{a, b}, x] && IGtQ[(n - 2)/4, 0] &&
IGtQ[m, 0] && LtQ[m, n - 1] && PosQ[a/b]

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rubi steps \begin{align*} \text {integral}& = -\frac {1}{x}-\int \frac {x^4}{1+x^6} \, dx \\ & = -\frac {1}{x}-\frac {1}{3} \int \frac {-\frac {1}{2}+\frac {\sqrt {3} x}{2}}{1-\sqrt {3} x+x^2} \, dx-\frac {1}{3} \int \frac {-\frac {1}{2}-\frac {\sqrt {3} x}{2}}{1+\sqrt {3} x+x^2} \, dx-\frac {1}{3} \int \frac {1}{1+x^2} \, dx \\ & = -\frac {1}{x}-\frac {1}{3} \tan ^{-1}(x)-\frac {1}{12} \int \frac {1}{1-\sqrt {3} x+x^2} \, dx-\frac {1}{12} \int \frac {1}{1+\sqrt {3} x+x^2} \, dx-\frac {\int \frac {-\sqrt {3}+2 x}{1-\sqrt {3} x+x^2} \, dx}{4 \sqrt {3}}+\frac {\int \frac {\sqrt {3}+2 x}{1+\sqrt {3} x+x^2} \, dx}{4 \sqrt {3}} \\ & = -\frac {1}{x}-\frac {1}{3} \tan ^{-1}(x)-\frac {\log \left (1-\sqrt {3} x+x^2\right )}{4 \sqrt {3}}+\frac {\log \left (1+\sqrt {3} x+x^2\right )}{4 \sqrt {3}}+\frac {1}{6} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,-\sqrt {3}+2 x\right )+\frac {1}{6} \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,\sqrt {3}+2 x\right ) \\ & = -\frac {1}{x}+\frac {1}{6} \tan ^{-1}\left (\sqrt {3}-2 x\right )-\frac {1}{3} \tan ^{-1}(x)-\frac {1}{6} \tan ^{-1}\left (\sqrt {3}+2 x\right )-\frac {\log \left (1-\sqrt {3} x+x^2\right )}{4 \sqrt {3}}+\frac {\log \left (1+\sqrt {3} x+x^2\right )}{4 \sqrt {3}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.96 \[ \int \frac {1}{x^2 \left (1+x^6\right )} \, dx=-\frac {12-2 x \arctan \left (\sqrt {3}-2 x\right )+4 x \arctan (x)+2 x \arctan \left (\sqrt {3}+2 x\right )+\sqrt {3} x \log \left (1-\sqrt {3} x+x^2\right )-\sqrt {3} x \log \left (1+\sqrt {3} x+x^2\right )}{12 x} \]

[In]

Integrate[1/(x^2*(1 + x^6)),x]

[Out]

-1/12*(12 - 2*x*ArcTan[Sqrt[3] - 2*x] + 4*x*ArcTan[x] + 2*x*ArcTan[Sqrt[3] + 2*x] + Sqrt[3]*x*Log[1 - Sqrt[3]*
x + x^2] - Sqrt[3]*x*Log[1 + Sqrt[3]*x + x^2])/x

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 4.45 (sec) , antiderivative size = 38, normalized size of antiderivative = 0.45

method result size
risch \(-\frac {1}{x}-\frac {\arctan \left (x \right )}{3}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-\textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left (-\textit {\_R}^{3}+\textit {\_R} +x \right )\right )}{6}\) \(38\)
default \(-\frac {1}{x}-\frac {\arctan \left (x \right )}{3}-\frac {\arctan \left (2 x -\sqrt {3}\right )}{6}-\frac {\arctan \left (2 x +\sqrt {3}\right )}{6}-\frac {\ln \left (1+x^{2}-\sqrt {3}\, x \right ) \sqrt {3}}{12}+\frac {\ln \left (1+x^{2}+\sqrt {3}\, x \right ) \sqrt {3}}{12}\) \(66\)
meijerg \(-\frac {1}{x}-\frac {x^{5} \left (\frac {\sqrt {3}\, \ln \left (1-\sqrt {3}\, \left (x^{6}\right )^{\frac {1}{6}}+\left (x^{6}\right )^{\frac {1}{3}}\right )}{2 \left (x^{6}\right )^{\frac {5}{6}}}+\frac {\arctan \left (\frac {\left (x^{6}\right )^{\frac {1}{6}}}{2-\sqrt {3}\, \left (x^{6}\right )^{\frac {1}{6}}}\right )}{\left (x^{6}\right )^{\frac {5}{6}}}+\frac {2 \arctan \left (\left (x^{6}\right )^{\frac {1}{6}}\right )}{\left (x^{6}\right )^{\frac {5}{6}}}-\frac {\sqrt {3}\, \ln \left (1+\sqrt {3}\, \left (x^{6}\right )^{\frac {1}{6}}+\left (x^{6}\right )^{\frac {1}{3}}\right )}{2 \left (x^{6}\right )^{\frac {5}{6}}}+\frac {\arctan \left (\frac {\left (x^{6}\right )^{\frac {1}{6}}}{2+\sqrt {3}\, \left (x^{6}\right )^{\frac {1}{6}}}\right )}{\left (x^{6}\right )^{\frac {5}{6}}}\right )}{6}\) \(137\)

[In]

int(1/x^2/(x^6+1),x,method=_RETURNVERBOSE)

[Out]

-1/x-1/3*arctan(x)+1/6*sum(_R*ln(-_R^3+_R+x),_R=RootOf(_Z^4-_Z^2+1))

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.27 (sec) , antiderivative size = 182, normalized size of antiderivative = 2.14 \[ \int \frac {1}{x^2 \left (1+x^6\right )} \, dx=-\frac {\sqrt {2} x \sqrt {i \, \sqrt {3} + 1} \log \left ({\left (i \, \sqrt {3} \sqrt {2} - \sqrt {2}\right )} \sqrt {i \, \sqrt {3} + 1} + 4 \, x\right ) - \sqrt {2} x \sqrt {i \, \sqrt {3} + 1} \log \left ({\left (-i \, \sqrt {3} \sqrt {2} + \sqrt {2}\right )} \sqrt {i \, \sqrt {3} + 1} + 4 \, x\right ) - \sqrt {2} x \sqrt {-i \, \sqrt {3} + 1} \log \left ({\left (i \, \sqrt {3} \sqrt {2} + \sqrt {2}\right )} \sqrt {-i \, \sqrt {3} + 1} + 4 \, x\right ) + \sqrt {2} x \sqrt {-i \, \sqrt {3} + 1} \log \left ({\left (-i \, \sqrt {3} \sqrt {2} - \sqrt {2}\right )} \sqrt {-i \, \sqrt {3} + 1} + 4 \, x\right ) + 4 \, x \arctan \left (x\right ) + 12}{12 \, x} \]

[In]

integrate(1/x^2/(x^6+1),x, algorithm="fricas")

[Out]

-1/12*(sqrt(2)*x*sqrt(I*sqrt(3) + 1)*log((I*sqrt(3)*sqrt(2) - sqrt(2))*sqrt(I*sqrt(3) + 1) + 4*x) - sqrt(2)*x*
sqrt(I*sqrt(3) + 1)*log((-I*sqrt(3)*sqrt(2) + sqrt(2))*sqrt(I*sqrt(3) + 1) + 4*x) - sqrt(2)*x*sqrt(-I*sqrt(3)
+ 1)*log((I*sqrt(3)*sqrt(2) + sqrt(2))*sqrt(-I*sqrt(3) + 1) + 4*x) + sqrt(2)*x*sqrt(-I*sqrt(3) + 1)*log((-I*sq
rt(3)*sqrt(2) - sqrt(2))*sqrt(-I*sqrt(3) + 1) + 4*x) + 4*x*arctan(x) + 12)/x

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.84 \[ \int \frac {1}{x^2 \left (1+x^6\right )} \, dx=- \frac {\sqrt {3} \log {\left (x^{2} - \sqrt {3} x + 1 \right )}}{12} + \frac {\sqrt {3} \log {\left (x^{2} + \sqrt {3} x + 1 \right )}}{12} - \frac {\operatorname {atan}{\left (x \right )}}{3} - \frac {\operatorname {atan}{\left (2 x - \sqrt {3} \right )}}{6} - \frac {\operatorname {atan}{\left (2 x + \sqrt {3} \right )}}{6} - \frac {1}{x} \]

[In]

integrate(1/x**2/(x**6+1),x)

[Out]

-sqrt(3)*log(x**2 - sqrt(3)*x + 1)/12 + sqrt(3)*log(x**2 + sqrt(3)*x + 1)/12 - atan(x)/3 - atan(2*x - sqrt(3))
/6 - atan(2*x + sqrt(3))/6 - 1/x

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.76 \[ \int \frac {1}{x^2 \left (1+x^6\right )} \, dx=\frac {1}{12} \, \sqrt {3} \log \left (x^{2} + \sqrt {3} x + 1\right ) - \frac {1}{12} \, \sqrt {3} \log \left (x^{2} - \sqrt {3} x + 1\right ) - \frac {1}{x} - \frac {1}{6} \, \arctan \left (2 \, x + \sqrt {3}\right ) - \frac {1}{6} \, \arctan \left (2 \, x - \sqrt {3}\right ) - \frac {1}{3} \, \arctan \left (x\right ) \]

[In]

integrate(1/x^2/(x^6+1),x, algorithm="maxima")

[Out]

1/12*sqrt(3)*log(x^2 + sqrt(3)*x + 1) - 1/12*sqrt(3)*log(x^2 - sqrt(3)*x + 1) - 1/x - 1/6*arctan(2*x + sqrt(3)
) - 1/6*arctan(2*x - sqrt(3)) - 1/3*arctan(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.76 \[ \int \frac {1}{x^2 \left (1+x^6\right )} \, dx=\frac {1}{12} \, \sqrt {3} \log \left (x^{2} + \sqrt {3} x + 1\right ) - \frac {1}{12} \, \sqrt {3} \log \left (x^{2} - \sqrt {3} x + 1\right ) - \frac {1}{x} - \frac {1}{6} \, \arctan \left (2 \, x + \sqrt {3}\right ) - \frac {1}{6} \, \arctan \left (2 \, x - \sqrt {3}\right ) - \frac {1}{3} \, \arctan \left (x\right ) \]

[In]

integrate(1/x^2/(x^6+1),x, algorithm="giac")

[Out]

1/12*sqrt(3)*log(x^2 + sqrt(3)*x + 1) - 1/12*sqrt(3)*log(x^2 - sqrt(3)*x + 1) - 1/x - 1/6*arctan(2*x + sqrt(3)
) - 1/6*arctan(2*x - sqrt(3)) - 1/3*arctan(x)

Mupad [B] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.66 \[ \int \frac {1}{x^2 \left (1+x^6\right )} \, dx=-\frac {\mathrm {atan}\left (x\right )}{3}+\mathrm {atan}\left (\frac {2\,x}{-1+\sqrt {3}\,1{}\mathrm {i}}\right )\,\left (\frac {1}{6}+\frac {\sqrt {3}\,1{}\mathrm {i}}{6}\right )+\mathrm {atan}\left (\frac {2\,x}{1+\sqrt {3}\,1{}\mathrm {i}}\right )\,\left (-\frac {1}{6}+\frac {\sqrt {3}\,1{}\mathrm {i}}{6}\right )-\frac {1}{x} \]

[In]

int(1/(x^2*(x^6 + 1)),x)

[Out]

atan((2*x)/(3^(1/2)*1i - 1))*((3^(1/2)*1i)/6 + 1/6) - atan(x)/3 + atan((2*x)/(3^(1/2)*1i + 1))*((3^(1/2)*1i)/6
 - 1/6) - 1/x